import Vue from 'vue'
import VueRouter from 'vue-router'
import App from './App.vue'
import {routes} from './routes'
import axios from 'axios'
import {store} from './store/store.js'


axios.defaults.baseURL = "https://wd1887079963ftokfa.wilddogio.com/";

//配置vue原型
Vue.prototype.http = axios

Vue.use(VueRouter)

const router = new VueRouter({
  routes,
  mode:'history',
  scrollBehavior(to,from,savedPosition){
    // return { selector:'.btn' }
    if(savedPosition){
      return savedPosition
    }else{
      return {x:0,y:0}
    }
  }
})

new Vue({
  el: '#app',
  router,
  store,
  render: h => h(App)
})
